This invention relates to an apparatus for detecting, for example, the displacement of a piston rod in a hydraulic cylinder.
An apparatus wherein pieces of a non-magnetic material are embedded in the surface of a piston rod at a fixed pitch interval in the axial direction to form a magnetic scale, and the sinusoidal variation of the output signal from a sensor attached to the side of a cylinder due to the motion of the piston rod is used to detect the displacement of the piston rod with high precision, has been disclosed by the Applicant and several others (Tokkaisho No. 63-263418, Tokkaihei No. 1-269015, Tokkaihei No. 2-105013 and other applications published by the Japanese Patent Office).
This magnetic sensor outputs a sine wave of one cycle for each pitch of the magnetic scale due to the motion of the piston rod, and by installing a pair of magnetic sensors in the axial direction of the piston rod such that two sine waves are output with a phase difference of 90.degree., the displacement of the rod within each pitch can be determined very precisely by computing an inverse trigonometric function.
More specifically, the following method can be used as disclosed in for example Jikkaihei No. 1-173604 published by the Japanese Patent Office.
FIG. 9 shows the waveform output from the magnetic sensors. The two sensor outputs which differ in phase by 90.degree. may be regarded as (sin) wave and (cos) wave. In this case, the sensor outputs y1, y2 due to the displacement of the piston rod within one pitch (0-2.pi.) of the magnetic scale are given respectively by:
y.sub.1 =V.sub.1 sin .theta. PA1 y.sub.2 =V.sub.2 cos .theta.
V.sub.1 and V.sub.2 are peak voltages determined by the characteristics of the magnetic sensor and of the magnetic scale. If the gain can be adjusted such that V.sub.1 =V.sub.2, we then obtain: EQU tan .theta.=sin .theta./cos .theta.=y.sub.1 /y.sub.2
An angular displacement .theta. may be determined from the sensor outputs y.sub.1 y.sub.2, i.e.: EQU .theta.=tan.sup.-1 (y.sub.1 /y.sub.2).
If we find .theta., therefore, the piston rod displacement (fine displacement) within 1 pitch (or 1/2 pitch) may be computed from: EQU .DELTA.l=(p/2.pi.). .theta.
where p is the pitch.
A coarse displacement at every pitch (1/2 pitch) on the magnetic scale can be found by observing the peak voltage or the center voltage (center value of the amplitude) of the sensor output. By adding this coarse displacement to the fine displacement between pitches, therefore, the actual displacement within 1 pitch can be measured with extremely high precision.
This displacement computation however assumes that V.sub.1 =V.sub.2 due to gain adjustment of peak voltages of sensor voltages. The two sensor outputs, however, may not always have the same amplitude and center voltage, but may vary at every pitch due to unevenness in the characteristics of the magnetic resistors comprising the magnetic sensors, unevenness in the depth of non-magnetic material in the piston rod or temperature variations. Unless these variations are compensated, therefore, the precision of the displacement that is computed cannot always be guaranteed.
As shown in FIG. 10, differences in depth of non-magnetic material at each pitch of the magnetic scale give rise directly to variations in the amplitudes of the output signals from the magnetic sensors. In addition, there will naturally be a difference between the center voltages of the magnetic sensors, drifts in the center voltages due to temperature variations, and variations of amplitude.
It is therefore impossible to compensate fluctuations, and in particular differences of amplitude at each pitch, merely by an initial gain adjustment of the magnetic sensors as described above, and it is thus difficult to detect the displacement with high precision. If the magnetic scale is embedded in the piston rod with high precision, it is of course possible to improve the precision of displacement detection. There is however a limit to this improvement, and if precision of the embedded depth is to be guaranteed, it necessarily entails a great increase in the cost of machining the piston rod.